package com.lyx.TestList;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

public class ArrayDemo {

    public static void main(String[] args) {
        Map<String,String> map = new HashMap<String, String>();
        map.put("s","s");
        int[] scores = new int[]{89,-23,64,91,119,52,73};
        //Arrays.sort(scores);
        newS(scores,scores.length);
        System.out.println(Arrays.toString(scores));
    }

    public static void newS(int[] array,int n){
        int i, j, k;
        for(i=0; i<n-1; i++)
            for(j=0; j<n-1-i; j++)
            {
                if(array[j]>array[j+1])
                {
                    k=array[j];
                    array[j]=array[j+1];
                    array[j+1]=k;
                }
            }

    }
}
